Generally, in storage apparatuses such as those using a magnetic disk, a magneto-optical disk, or an optical disc, for example, an actual access to the storage medium is carried out in response to a request from a host such as a data processor. Therefore, in the storage apparatuses, formatting on the storage medium may be performed. Examples of such formatting may include physical formatting, such as count-key-data (CKD) formatting, and logical formatting. Logical formatting divides a data region into processing units, for example blocks, used by a host operating system (OS) and discriminates the blocks from one another. When the storage medium is formatted in this way, accesses such as read/write accesses to the storage medium, corresponding to host commands of the host OS are made possible.
When a volume is created in a storage apparatus (e.g. a disk array subsystem) upon a request being made by the host, a storage control device generally needs to ensure that data on a disk is in an initialized state. First, the storage control device executes physical formatting on the disk before logical formatting. In physical formatting, writing of zero data onto the target medium, for example, is carried out. For example, when the host requests creation of a certain amount of volume, two regions forming a pair, each in a different disk, are reserved for the volume in order to maintain redundancy of data. Then, physical formatting is performed sequentially from the beginning of the two volume regions forming a pair. At this time, physical formatting is simultaneously or substantially simultaneously performed for corresponding data blocks in the two volume regions forming a pair in order to maintain redundancy.
While the above-mentioned sequential physical formatting is executed, processing called quick formatting is also executed. Quick formatting enables an input/output (I/O) access to be made to a volume immediately after the host requests creation of the volume. This quick formatting is carried out by using a bitmap (quick formatting management table) indicating a formatted/unformatted state for each data block in the volume. In the bitmap, data blocks on which sequential physical formatting has been performed and data blocks on which quick formatting has been performed are registered as formatted data blocks.
When the storage control device receives an I/O access from the host during sequential physical formatting, the storage control device checks whether a data block that is to be subjected to the I/O access has been formatted or not by referring to the aforementioned bitmap. If the data block has been formatted, the storage control device immediately executes the I/O access thereto. If the data block has not been formatted, the storage control device preferentially executes physical formatting, that is quick formatting, on the data block that is to be subjected to the I/O access rather than sequential physical formatting. Upon the completion of such quick formatting, the data block is registered in the aforementioned bitmap as a formatted data block and the I/O access thereto is executed.
By executing the above-mentioned formatting processing, each of the two volume regions forming a pair is formatted as shown in FIG. 5. In FIG. 5, blocks with diagonal lines correspond to formatted data blocks in each region and blank blocks correspond to unformatted data blocks in each region. In addition, the formatted data blocks in a region A1 in FIG. 5 are data blocks that have been formatted by sequential physical formatting, and the formatted data blocks located in a region A2 in FIG. 5 are data blocks that have been formatted by quick formatting.
When a disk containing one of the two volume regions forming a pair has failed during the above-mentioned formatting processing and has been replaced with a spare disk or a new disk, the following recovery processing is executed. Hereinafter, the disk that has not failed is referred to as the “primary disk” and the disk used to replace the failed disk is referred to as the “secondary disk”.
That is, in the recovery processing, the content of the primary disk is copied to the secondary disk to maintain redundancy. This recovery processing is executed following the sequential formatting performed in the primary disk. For example, after the region A1 in FIG. 5 is recovered in the secondary disk, whenever the sequential formatting processing is executed on data blocks that follow the region A1 in the primary disk, the recovery processing for the corresponding data blocks is executed in the secondary disk.
When formatting processing and recovery processing conflict with each other due to failure of a disk during the formatting processing of the disk, the recovery processing is executed following the sequential formatting processing. Therefore, the recovery processing will be completed after the completion of the sequential formatting processing for all the regions in a target volume. That is, redundancy is restored after the completion of the sequential formatting processing for all the regions of the target volume, and thus it takes time to restore redundancy. In other words, the sequential formatting processing and the recovery processing is not performed at the same time or in parallel.